<{Tinclude "commom/admin_header"}>
 <section id="container" >
      
      <!--顶部-->
      <{Tinclude"commom/admin_inner_header"}>
      <!--顶部-->
      
       <{Tinclude"commom/admin_left_menu"}>
       
       <section id="main-content">
          <section class="wrapper">
          	<h3><i class="<{if $___menuinfo["iconclass"]}><{$___menuinfo["iconclass"]}><{else}>fa fa-list-ul<{/if}>"></i><{$___menuinfo["base_name"]}></h3>
                <div class="row mt">
                    <div class="col-md-12">
                        <div class="form-panel">
                             <{if $list}>           
                            <section id="no-more-tables">                   
  <table class="table table-striped table-condensed table-hover cf">
      <thead class="cf">
        <tr>
          <th>支付类型</th>
          <th>图片</th>
          <th>名称</th> 
           <th>状态</th> 
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
              <{foreach $list as $item}>
              <tr>
                  <td data-title="支付类型">
                      <{$item["base_name"]}>
                  </td>
                    <td data-title="图片">
                        <img data-tid="<{$item["id"]}>" src="<{$item["thumb"]}>" data-psrc="<{$item["image"]}>"  class="tenanttx cursor" width="80" data-toggle="modal" data-target="#ajax_upload_file" />
                
                  </td>
                    <td data-title="名称">
                      <{$item["c_base_name"]}>
                  </td>
                     <td data-title="状态">
                     <div class="switch switch-mini" data-id="<{$item["id"]}>" data-on-label="<i class=' fa fa-check'></i>" data-off-label="<i class='fa fa-times'></i>">
                           <input type="checkbox" <{if $item["status"]==1}>checked<{/if}> />
                             </div>
                  </td>
                    <td data-title="操作">
                        <div class="btn-group">
                            <a class="btn btn-primary btn-xs" href="<{echo Common::RewriteUrl("PayapiManage","edit","&id=".$item["id"]);}>" ><span class="glyphicon glyphicon-edit"></span></a>
                        </div>
                  </td>
              </tr>
              <{/foreach}>
          
      </tbody>
  </table>
                            </section>
                                <{else}>
                             <div class="col-md-12 col-xs-12">
                                 <h4 class="text-center">数据为空</h4>
                             </div>
                              <{/if}> 
                        </div>
                    </div>
                </div>
          </section>
       </section>
 </section>
   <{Tinclude "commom/ajax_upload_file"}>
   <script>
       $(document).ready(function(){
            $(".tenanttx").change(function(){
                var tid=$(this).data("tid");
                var image=$(this).data("psrc");
                
                var url="<{echo Common::RewriteUrl("PayapiManage","public_ajax_editimage");}>";
                $.post(url,{"tid":tid,"image":image},function(data){
                    
                },"json");
            });
            
            $(".switch").on('switch-change', function (e, data) {
            var id=$(e.target).data("id");
            var status=data.value?1:0;
            if(id){
               
                var url="<{echo Common::RewriteUrl("PayapiManage","public_ajax_admin_pay_edit_status");}>";
             
                $.post(url,{"id":id,"status":status},function(data){
                    //console.log(data);
                });
               
            }
        });
       });
   </script>
<{Tinclude"commom/admin_footer"}>